home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
DBTOOLC.LZH
/
SOURCE.ARC
/
PUTWINDO.C
< prev
next >
Wrap
Text File
|
1986-07-01
|
936b
|
37 lines
putwindow(y1,x1,y2,x2,buffer, clear,type)
int y1,x1; /* coordinates of upper left corner */
int y2,x2; /* coordinates of lower right corner */
int *buffer; /* place to store previous screen contents */
int clear; /* if non-zero, clear contents of window */
int type; /* 0 if single border, else double border */
{
int i;
if (buffer != (char *) 0) /* 0 means don't bother */
savwindo(y1,x1,y2,x2,buffer);
if (clear)
for (i = 0; i <= y2-y1; i++)
{
curlocat(y1+i, x1);
wrtch((x2-x1),' ');
}
curlocat(y1,x1);
wrtch(x2-x1, type ? 205 : 196);
wrtch(1,type ? 201 : 218);
curlocat(y1,x2);
wrtch(1,type ? 187 : 191);
for (i = 0; i <= y2-y1-2; i++)
{
curlocat(y1+i+1,x1);
wrtch(1,type ? 186 : 179);
curlocat(y1+i+1,x2);
wrtch(1,type ? 186 : 179);
}
curlocat(y2,x1);
wrtch(x2-x1,type ? 205 : 196);
wrtch(1,type ? 200 : 192);
curlocat(y2,x2);
wrtch(1,type ? 188 : 217);
}